﻿<UserControl x:Class="SilverlightApplication1.Page"
    xmlns="http://schemas.microsoft.com/client/2007" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="400" Height="300">
    <Canvas Background="LightBlue">
        <Canvas.Resources>
            <Style TargetType="TextBlock" x:Key="TextBlockStyle">
                <Setter Property="FontFamily" Value="Comic Sans Ms"></Setter>
                <Setter Property="Text" Value="Click!"></Setter>
                <Setter Property="Foreground" Value="MediumBlue"></Setter>
                <Setter Property="FontSize" Value="20"></Setter>
            </Style>
            <Style x:Key="ImageButton" TargetType="Button">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Button">
                            <StackPanel Orientation="Vertical">
                                <Image Source="icon.jpg" Height="48" Width="48"></Image>
                                <TextBlock Style="{StaticResource TextBlockStyle}" Foreground="Black"></TextBlock>
                            </StackPanel>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </Canvas.Resources>
        <Button x:Name="btn1" Style="{StaticResource ImageButton}" Canvas.Top="20" Canvas.Left="20"></Button>
        <Button x:Name="btn2" Style="{StaticResource ImageButton}" Canvas.Top="20" Canvas.Left="120"></Button>
        <Button x:Name="btn3" Style="{StaticResource ImageButton}" Canvas.Top="20" Canvas.Left="220"></Button>
    </Canvas>
</UserControl>
